package com.xk857.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @author CV大魔王
 * @Description MybatisPlus分页配置
 * @date 2021/2/21 14:31
 */
@Configuration
@MapperScan("com.xk857.system.mapper")
@EnableTransactionManagement // 开启事务管理
public class MyBatisConfig {

    @Bean
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor();
    }

}
